<?php 
/**
 * [PHPFOX_HEADER]
 * 
 * 
 * @author  		hoa hua thien
 * @package  		Module_Webmix
 * @version 		
 */
 
defined('PHPFOX') or exit('NO DICE!'); 

?>

<div class="webmix_content">
    <div id="data_gird_" class="data_gird">
	<div class="sortable">
	    {foreach from=$aWidgets key=iWidgetKey item=aWidget}
		<div id="widget_{$aWidget}" class="widget">{$aWidget}</div>
	    {/foreach}
	    
	</div>
<!--	<ul class="sortable">
	    {foreach from=$aWidgets item=aWidget}
		<li id="widget_{$aWidget}">{$aWidget}</li>
	    {/foreach}
	</ul>-->
    </div>
</div>
<script type="text/javascript">
{literal}
$(function(){
    $.contextMenu({
        selector: '.widget', 
        callback: function(key, options) {
            var m = "clickedhoa: " + key + "_" + this.attr('id');

            window.console && console.log(m) || alert(m); 
        },
        items: {
            "edit": {name: "Edit", icon: "edit"},
            "delete": {name: "Delete", icon: "delete"},
        }
    });
});
{/literal}
</script>